home *** CD-ROM | disk | FTP | other *** search
- /********************************************************************************
- file: ATQCGlue.c
- ********************************************************************************/
- #include <Types.h>
- #include <AppleTalk.h>
-
- /*----------------------------------------------------------------------
- Network Transition Info Record
- ----------------------------------------------------------------------*/
-
- typedef struct TNetworkTransition {
- Ptr private; /* pointer to private structure */
- ProcPtr netValidProc; /* pointer to network validation procedure */
- Boolean newConnectivity; /* true = new connection, */
- /* false = loss of connection */
-
- }
- TNetworkTransition , *TNetworkTransitionPtr, **TNetworkTransitionHdl;
-
- typedef pascal long (*NetworkTransitionProcPtr)(TNetworkTransitionPtr netTrans, \
- unsigned long theNet);
-
- /*----------------------------------------------------------------------
- AppleTalk Transition Queue Element
- ----------------------------------------------------------------------*/
- typedef struct myATQEntry {
- Ptr qLink; /* -> next queue element */
- short qType; /* unused */
- ProcPtr CallAddr; /* -> transition procedure */
- Ptr globs; /* -> to user defined globals */
- }
- myATQEntry, *myATQEntryPtr, **myATQEntryHdl;
-
- /*----------------------------------------------------------------------
- Prototypes
- ----------------------------------------------------------------------*/
- pascal long ATQueueProc (long selector, myATQEntry *q, void *p);
- long CALLTRANSQUEUE(long selector, myATQEntry *q, void *p);
- /* Capitalize CALLTRANSQUEUE so that linker can match this entry with */
- /* the pascal call */
- pascal long CallNetValidProc(ProcPtr p, TNetworkTransitionPtr netTrans, long theNet);
-
-
- long CALLTRANSQUEUE(long selector, myATQEntry *q, void *p)
- /* CallTransQueue sets up the pascal stack for the SampleTransQueue handler */
- /* then puts the result into D0 */
- {
- return(ATQueueProc(selector, q, p));
- }
-
- pascal long CallNetValidProc(ProcPtr p, TNetworkTransitionPtr netTrans, long theNet)
- /* CallNetValidProc is used to call the netValidProc pointed to by ProcPtr p. */
- {
- NetworkTransitionProcPtr myNTProcPtr;
-
- myNTProcPtr = (NetworkTransitionProcPtr)p;
- return ((*myNTProcPtr)(netTrans, theNet));
- }
-